﻿<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,height=device-height,inital-scale=1.0,maximum-scale=1.0,user-scalable=no;"
    />
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <meta name="apple-mobile-web-app-status-bar-style" content="black" />
    <meta name="format-detection" content="telephone=no" />
    <title>编辑信息</title>
    <link rel="stylesheet" type="text/css" href="../plugins/weui/css/weui.min.css">
    <link rel="stylesheet" type="text/css" href="../css/base.css">
    <link rel="stylesheet" type="text/css" href="../css/css.css">
</head>

<style type="text/css">
   body{background-color:#F3F3F3;width:100%;height:100%;overflow-x:hidden;max-width:640px}
.number{padding-top:10px;padding-bottom:10px}
.number input{height:30px;border:none}
.choose_country{border:1px solid #666;padding:2px 15px;margin-right:15px;color:#666}
.choose_active{border:1px solid #FE7B03;color:#FE7B03}
.color_h{color:#666}
#selectdate{border:none}
.save_btn{border-radius:5px;color:#fff;margin-top:25px;margin-bottom:25px;width:80%;margin-left:auto;margin-right:auto;background-color:#FE7B03;border:none}
.hide{display:none}
.number-head{width:100%;height:50px;line-height:50px;padding-left:15px;color:#B3B3B5;font-size:14px;border-bottom:solid 1px #E3E3E3}
.color{width:100%;height:45px;line-height:45px;padding-left:15px;font-size:16px;border-bottom:solid 1px #E3E3E3;background-color:#fff;float:left}
.f-left{width:60%;float:left}
.mpui-switch__box{position:relative;width:42px;height:22px;border:1px solid #c9c9c9;outline:0;border-radius:16px;box-sizing:border-box;background-color:#c9c9c9;transition:background-color .3s,border .3s;cursor:pointer;left:80%;top:11px}
.mpui-switch__box:before{content:" ";position:absolute;top:0;left:0;width:40px;height:20px;border-radius:15px;background-color:#c9c9c9;transition:transform .35s cubic-bezier(.45,1,.4,1)}
.mpui-switch__box:after{content:" ";position:absolute;top:0;left:0;width:20px;height:20px;border-radius:15px;background-color:#fff;box-shadow:0 1px 3px rgba(0,0,0,.4);transition:transform .35s cubic-bezier(.4,.4,.25,1.35)}
#leave-message-textarea{width:100%;min-height:50px;line-height:40px;max-height:200px;outline:0;font-size:16px;-webkit-user-modify:read-write-plaintext-only;border-bottom:solid 1px #E3E3E3}
[contentEditable=true]:empty:not(:focus):before{content:attr(data-text)}

</style>

<body>
    <div class="number-head">已成为你的客户<span class="item-days"></span>天</div>
    <div class="weui-cells weui-cells_form" style="margin-top:0">
        <div class="weui-cell">
            <div class="weui-cell__hd">
                <label class="weui-label">来源</label>
            </div>
            <div class="weui-cell__bd">
                <input class="weui-input color_h name item-source" type="text" disabled="disabled"  placeholder="" />
            </div>
        </div>
        <div class="weui-cell">
            <div class="weui-cell__hd">
                <label class="weui-label">备注名</label>
            </div>
            <div class="weui-cell__bd">
                <input class="weui-input color_h item-memoname" type="text" disabled="disabled" value="" />
            </div>
        </div>
        <div class="weui-cell">
            <div class="weui-cell__hd">
                <label class="weui-label">性别</label>
            </div>
            <div class="weui-cell__bd">
                <input class="weui-input color_h position" type="text" disabled="disabled" value="男" />
            </div>
        </div>
        <div class="weui-cell">
            <div class="weui-cell__hd">
                <label class="weui-label">手机号码</label>
            </div>
            <div class="weui-cell__bd">
                <input class="weui-input color_h position" type="text" disabled="disabled" value="未填写" />
            </div>
        </div>
        <div class="weui-cell">
            <div class="weui-cell__hd">
                <label class="weui-label">邮箱</label>
            </div>
            <div class="weui-cell__bd">
                <input class="weui-input email" type="text" placeholder="请输入邮箱" />
            </div>
        </div>
        <div class="weui-cell">
            <div class="weui-cell__hd">
                <label class="weui-label">公司</label>
            </div>
            <div class="weui-cell__bd">
                <input class="weui-input color_h position" type="text" disabled="disabled" value="未填写" />
            </div>
        </div>
        <div class="weui-cell">
            <div class="weui-cell__hd">
                <label class="weui-label">职位</label>
            </div>
            <div class="weui-cell__bd">
                <input class="weui-input wxid" type="text" placeholder="未填写" />
            </div>
        </div>
        <div class="weui-cell">
            <div class="weui-cell__hd">
                <label class="weui-label">详细地址</label>
            </div>
            <div class="weui-cell__bd">
                <input class="weui-input phone" type="text" placeholder="请输入详细地址" />
            </div>
        </div>
        <div class="weui-cell weui-cell_select weui-cell_select-after number">
            <div class="weui-cell__hd">
                <label for="" pattern="[0-40]*" class="weui-label">生日</label>
            </div>
            <div>
                <input type="text" class="mobile" placeholder="">
                <img src="../images/boss-label/123.png" style="width: 20px; margin-left: 35px;">
            </div>
        </div>
    </div>
    <div class="color">
        <div class="f-left">屏蔽TA的消息推送</div>
        <div class="mpui-switch__box"></div>
    </div>
    <div style="clear: both;"></div>
    <div class="number-head">备注：</div>
    <div  id="leave-message-textarea" contenteditable="true" data-text="" ></div>
    <div class="button-sp-area save_btn">
        <a href="javascript:;" class="weui-btn btn-submit">保存</a>
    </div>
</body>



<script type="text/javascript" src="../js/jquery-2.1.4.min.js"></script>
<script type="text/javascript" src="../js/base.js"></script>
<script type="text/javascript">
    //地区选择
    var area1 = new LArea();
    $(function () {
        loadClient();
        loadBtn();
    });


    function loadClient() {
        ajaxGet("", function (data) {
            if (!isJsonSuccess(data))
                return;


        })
    }
    function submits() {
        //UpdateClient
    }

    function loadBtn() {

        //提交
        $(".btn-submit").click(function () {submits()});
    }

    function phone() {
        var myreg = /^[1][3,4,5,7,8][0-9]{9}$/;
        var phoone = $('.mobile').val();
        if (phoone == "") {
            Alert("手机号不能为空");
            return false;
        } else if (!myreg.test(phoone)) {
            Alert("手机格式不对，请重新输入");
            $(".mobile").focus();
            return false;
        } else {
            return true;
        }
    }

    function email() {
        var email = $('.email').val();
        if (email == "") {
            Alert("邮箱不能为空");
            return false;
        } else if (!email.match(/^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+((\.[a-zA-Z0-9_-]{2,3}){1,2})$/)) {
            Alert("邮箱格式不正确！请重新输入");
            $(".email1").focus();
            return false;
        } else {
            return true;
        }
    }

    //验证手机号
    $('.mobile').blur(function () {
        phone();
    })
    //验证邮箱
    $('.email').blur(function () {
        email();
    })


</script>

</html>